from net_project_tools.XinCoursePage import XinCoursePage
from page.net_project_tools.net_course_page import NetCoursePage
import user_data
import unittest
import warnings


class XinxiCourseTest(unittest.TestCase):

    def setUp(self):
        warnings.simplefilter('ignore', ResourceWarning)

    def tearDown(self):
        self.page.logout()
        # self.page.quit()

    def test_net_course(self):
        """课程学习"""
        self.page = XinCoursePage()
        self.page.login(*user_data.Xinxi_student)
        self.page.enter_project()
        self.page.enter_tools('课程学习')
        # self.page.xuan_class()
        self.page.learn_course()

    def test_net_Xuan(self):    #学员选点
         self.page = XinCoursePage()
         self.page.login(*user_data.Xinxi_student)
         self.page.enter_project()
         self.page.Xuandian()

    def test_net_XueKE(self):  #移动端暂时不支持学科选维度
        self.page = XinCoursePage()
        self.page.login(*user_data.Xinxi_xueke)
        self.page.enter_project()
        self.page.Xueke()


    def test_net_Xiao(self):  #移动端暂时不支持校长选环境
        self.page = XinCoursePage()
        self.page.login(*user_data.Xinxi_project_admin)
        self.page.enter_project()
        self.page.Xiao()


if __name__ == '__main__':
    unittest.main()
